import {
    HTTP
}
    from '../util/http-p'

class BookModel extends HTTP {

    getHotList() {
        return this.request(
            "/book/hot_list"
        )
    }

    //看书人数
    getMyCount(bid) {
        return this.request(
            '/book/favor/count'
        )
    }

    //书籍详情
    getDetail(bid) {
        return this.request(
            `/book/${bid}/detail`
        )
    }

    //书籍喜欢状态
    getLikeStatus(bid) {
        return this.request(
            `/book/${bid}/favor`
        )
    }

    //书籍详情
    getComment(bid) {
        return this.request(
            `/book/${bid}/short_comment`
        )
    }

    //提交短评
    postComment(bid, comment) {
        return this.request(
            `/book/add/short_comment`,
            {
                book_id: bid,
                content: comment
            },
            'POST'


)
}


}


export {BookModel}

